package com.bawei.mvvmdemo.net;

import com.bawei.mvvmdemo.entity.BannerEntity;
import com.bawei.mvvmdemo.entity.BaseResponseEntity;
import com.bawei.mvvmdemo.entity.GoodsEntity;
import com.bawei.mvvmdemo.entity.TypeEntity;

import java.util.List;

import androidx.lifecycle.LiveData;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * @Author : yaotianxue
 * @Time : On 2023/9/12 16:37
 * @Description : Api
 */
public interface Api {

    @GET("/banner/select")
    LiveData<BaseResponseEntity<BannerEntity>> banner(@Query("type") int type, @Query("page") int page, @Query("pageSize") int pageSize);
    //分类
    @GET("/category/getType")
    LiveData<BaseResponseEntity<List<TypeEntity>>> type(@Query("type") int type);

    //商品
    @GET("/goods/category/{id}/{page}/{size}")
    LiveData<BaseResponseEntity<GoodsEntity>> goods(@Path("id") int id,@Path("page") int page,@Path("size") int size);
}
